package demo10.controller;

import demo10.pojo.User;
import demo10.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

@Controller
public class UserController {
    @Autowired
    private UserService userService;
    public void  addUser(){
        User user=new User();
        user.setId(110);
        user.setName("贝仁杰");
        user.setAge(2022);
        user.setSex("男");
        userService.addUser(user);
    }
}

